﻿using Catel.Articles.Base.Data.Attributes;
using Catel.Articles.Base.UI;

namespace Catel.Articles._02___WPF_controls.Examples.BrowseForFile
{
    [Example("BrowseForFile", "Example of the BrowseForFile control",
        LongDescription = @"The BrowseForFile control allows you to easily add 'browse for file' features to your application.

The control includes a button so you don't have to take care of this yourself.",
        SourceFileName = "/Examples/BrowseForFile/Code.txt",
        ImageUri = "/Examples/BrowseForFile/Screenshot.png",
        ClickHandlerName = "ShowExample")]
    public class Example
    {
        /// <summary>
        /// Shows the example.
        /// </summary>
        private static void ShowExample()
        {
            // Create control
            Windows.Controls.BrowseForFile browseForFile = new Windows.Controls.BrowseForFile();
            
            // Show control
            ExampleHelper.ShowControlInWindow(browseForFile, "Select a file", 200, 200);
        }
    }
}
